package com.fly.service.Impl;

import com.fly.bean.*;
import com.fly.mapper.TaskMapperL;
import com.fly.service.TaskServiceL;
import com.fly.util.Page;
import com.fly.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class TaskServcieLImpl implements TaskServiceL {
    @Autowired
    TaskMapperL taskMapperL;

    @Override
    public DamageRecord selectDamageRecordByPoleId(Integer poleId) {
        return taskMapperL.selectDamageRecordByPoleId(poleId);
    }

    @Override
    public List<Task> selectAllTaskByUserId(UserIdPageVO userIdPageVO) {

        List<Task> taskList = taskMapperL.selectTaskByUsersId(userIdPageVO);

        return taskList;

    }

    @Override
    public Integer selectCountTaskByUserId(UserIdPageVO UserIdPageVO) {
        Integer integer=taskMapperL.selectCountTaskByUserId(UserIdPageVO);
        return integer;
    }


    @Override
    public List<Task> selectAllTaskByCondition(TaskDatePageVo taskDatePageVo) {
        List<Task> tasks=taskMapperL.selectAllTaskByCondition(taskDatePageVo);
        return tasks;
    }

    @Override
    public Integer selectCountTaskByCondition(TaskDatePageVo taskDatePageVo) {
        return taskMapperL.selectCountTaskByCondition(taskDatePageVo);
    }

    @Override
    public void changeTaskState(Integer taskId) {
        taskMapperL.changeTaskState(taskId);
    }

    @Override
    public TaskPoleVO selectTaskAndPoles(Integer taskId) {
        return taskMapperL.selectTaskAndPoles(taskId);
    }

    @Override
    public PoleMsgVO selectMsgByPoleId(Integer poleId) {
        return taskMapperL.selectMsgByPoleId(poleId);
    }

    @Override
    public void insertRecordByPoleId(DamageRecord damageRecord) {
        taskMapperL.insertRecordByPoleId(damageRecord);
    }

    @Override
    public CircuitryPoleRecordVO selectRecordByPoleId(Integer poleId) {
        return taskMapperL.selectRecordByPoleId(poleId);
    }

    @Override
    public List<DefectsVO> selectAllDefects(Page page) {
        return taskMapperL.selectAllDefects(page);
    }

    @Override
    public Integer selectCountDefects() {
        return taskMapperL.selectCountDefects();
    }

    @Override
    public List<DefectsVO> selectDefectsByCondition(findDefectsVO findDefectsVO) {
        return taskMapperL.selectDefectsByCondition(findDefectsVO);
    }

    @Override
    public void updateRecordByPoleId(DamageRecord damageRecord) {
        taskMapperL.updateRecordByPoleId(damageRecord);
    }

    @Override
    public void changeDefectsLevel(DamageIdLevelVO damageIdLevelVO) {
        taskMapperL.changeDefectsLevel(damageIdLevelVO);
    }

    @Override
    public List<DefectsVO> selectAllDefectsIsNull(Page page) {
        return taskMapperL.selectAllDefectsIsNull(page);
    }

    @Override
    public Integer selectCountDefectsByCondition(findDefectsVO findDefectsVO) {
        return taskMapperL.selectCountDefectsByCondition(findDefectsVO);
    }

    @Override
    public List<Defects> selectDefectsName() {
        return taskMapperL.selectDefectsName();
    }

    @Override
    public Task selectTask(String taskNo) {
        return taskMapperL.selectTask(taskNo);
    }

    @Override
    public void insertReceiptByTaskId(DamageRecordTaskVO damageRecordTaskVO) {
        taskMapperL.insertReceiptByTaskId(damageRecordTaskVO);
    }

    @Override
    public Integer selectCountDefectsIsNullByCondition(findDefectsIsNullVO findDefectsIsNullVO) {
        return taskMapperL.selectCountDefectsIsNullByCondition(findDefectsIsNullVO);
    }

    @Override
    public List<DefectsVO> selectAllDefectsIsNullByCondition(findDefectsIsNullVO findDefectsIsNullVO) {
        return taskMapperL.selectAllDefectsIsNullByCondition(findDefectsIsNullVO);
    }

    @Override
    public Integer selectCountDefectsIsNull(Page page) {
        return taskMapperL.selectCountDefectsIsNull(page);
    }

    @Override
    public List<Pole> selectPolesByTaskIdNotInsert(UserIdTaskIdVO userIdTaskIdVO) {
        return taskMapperL.selectPolesByTaskIdNotInsert(userIdTaskIdVO);

    }


}
